using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Comteck.Domain.Entities;

namespace Comteck.Entities.Orders {
  /// <summary>
  /// 
  /// </summary>
  [Table("SaleOrderDetail")]
  public class SaleOrderDetail : Entity<string> {
    /// <summary>
    /// 订单id
    /// </summary>
    [Key]
    [Required]
    public override string Id { get; set; }

    /// <summary>
    /// 订单id
    /// </summary>
    [Required]
    public string OrderId { get; set; }

    /// <summary>
    /// 商品ID
    /// </summary>
    [Required]
    public int ProductId { get; set; }

    /// <summary>
    /// 商品名称
    /// </summary>
    public string ProductName { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int SeqNo { get; set; }

    /// <summary>
    /// 商品数量
    /// </summary>
    [Required]
    public int Qty { get; set; }

    /// <summary>
    /// 单位重量
    /// </summary>
    [Required]
    public decimal Weight { get; set; }

    /// <summary>
    /// 总重量
    /// </summary>
    [Required]
    public decimal TotalWeight { get; set; }

    /// <summary>
    /// 明细组号
    /// </summary>
    public string GroupDetailId { get; set; }
  }
}
